﻿using System;
using Wangzeran.CodeMaker.Core.DB;

namespace Wangzeran.CodeMaker.PlugIns.DB.SQLServer2000
{
    public class SQLServerPlugIn : IDBPlugInSupport
    {
        #region IDBPlugInSupport 成员

        public string DatabaseType
        {
            get { return "mssql2000"; }
        }
        /// <summary>
        /// 数据库实体
        /// </summary>
        private IDBUtility dbUtiltiy;
        /// <summary>
        /// 获取数据库实体
        /// </summary>
        public IDBUtility DbUtility
        {
            get
            {
                if (dbUtiltiy == null)
                {
                    dbUtiltiy = new SQLServerUtility();
                }
                return dbUtiltiy;
            }
        }

        /// <summary>
        /// 数据库架构信息
        /// </summary>
        private IDBSchema dbSchema;
        /// <summary>
        /// 获取数据库架构信息
        /// </summary>
        public IDBSchema DbSchema
        {
            get
            {
                if (dbSchema == null)
                {
                    dbSchema = new SQLServerSchema();
                }
                return dbSchema;
            }
        }

        public IDBDAL DbDal
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}
